package com.battle.project.order.controller;

import com.battle.project.order.service.OrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderInfoController {

    @Autowired
    private OrderInfoService orderInfoService;


    @RequestMapping(method = {RequestMethod.GET}, value = "/findOrderInfo", produces = "application/json", consumes = "application/json")
    public String findOrderInfo() {
        return orderInfoService.findOrderInfoById();
    }

    @GetMapping(value = "/fanoutSendMessage")
    public String fanoutSendMessage(String message) {
        return orderInfoService.fanoutSendMessage(message);
    }
    @GetMapping(value = "/directSendMessage")
    public String directSendMessage(String message) {
        return orderInfoService.directSendMessage(message);
    }
    @GetMapping(value = "/topicSendMessage")
    public String topicSendMessage(String message) {
        return orderInfoService.topicSendMessage(message);
    }
    @GetMapping(value = "/headersSendMessage")
    public String headersSendMessage(String message) {
        return orderInfoService.headersSendMessage(message);
    }


}
